<template>
  <div class="healthDetail-content">
          <div class="healthDetailBox">
                 <div class="headerBox" style="margin-top:0">
                      <div class="line"></div>
                      <div class="title">人员健康证详情</div>
                </div>

                <div class="detailBox">
                       <div class="detailBox-left">
                             <el-image class="image" :src="infoData.imgUrl" fit="cover"></el-image>   
                       </div>
                       <div class="detailBox-right per100">
                            <div class="tableBox">
                            <div class="tr soildTop per100 display-fx-center">
                              <div class="td">
                                    <span>姓名</span>
                              </div>
                              <div class="full">{{infoData.name}}</div>
                          </div>
                              </div>
                              <div class="tableBox">
                                        <div class="tr per100 display-fx-center">
                                          <div class="td">
                                                <span>身份证号</span>
                                          </div>
                                          <div class="full">{{infoData.identityNumber}}</div>
                                      </div>
                              </div>
                              <div class="tableBox">
                                          <div class="tr per100 display-fx-center">
                                            <div class="td">
                                                  <span>人员联系电话</span>
                                            </div>
                                            <div class="full">{{infoData.phone}}</div>
                                        </div>
                              </div>
                              <div class="tableBox">
                                          <div class="tr per100 display-fx-center">
                                            <div class="td">
                                                  <span>健康证到期时间</span>
                                            </div>
                                            <div class="full">{{infoData.deadlineTime}}</div>
                                        </div>
                              </div>
                       </div>
                </div>
                 <div class="health-certificate">
                        <el-image class="image" :src="infoData.healthyImgUrl" fit="cover"></el-image>
                 </div>
                
               <div class="footer-btn">
                      <el-button class="btn" @click="goBackBtn">返回</el-button>
               </div>
          </div>

  </div>
</template>

<script>
   import { getHealthDetail} from "@/api/zhangping/watherDrinking";
  export default {
    data() {
      return {
         infoData:{},
      };
    },
    created() {
           this.getHealthDetailFn()
    },
    methods: {
       getHealthDetailFn(){
        let data = {
              identityNumber:this.$route.query.identityNumber 
        }
        getHealthDetail(data).then(res=>{
                if(res.code == 200){
                     this.infoData = res.data
                }else{
                     this.$message.error(res.msg);  
                }    
         })
    },
        goBackBtn(){
          this.$router.back()
        },
    }
  };
</script>
<style lang="scss" scoped>
         .display-fx-center{
             display: flex;
             align-items: center;
         }
         .per100{
             width: 100%!important;
         }
         .soildTop{
             border-top:solid 1px  #D3D8E2;
         }
         .healthDetail-content{
              overflow-y: auto;
              position: relative;
              background-color: #fff;
              padding: 40px 20px;
              border-radius: 10px;
              height: calc( 100vh - 66px - 128px);
              // display: flex;
              // flex-direction: column;
             .healthDetailBox{
                    max-width: 930px;
                    margin: 0 auto;
                    padding-bottom:40px;

              }
              .detailBox{
                  @extend .display-fx-center;
                  .detailBox-left{
                      flex-shrink: 0;
                      width: 182px;
                      height: 240px;
                      margin-right:10px;
                      .image{
                          width: 100%;
                          height: 100%;
                      }
                  }    
              }
            .tableBox{
                  font-size: 14px;
                  @extend .display-fx-center;
                  .tr{
                      width: 50%;
                      height: 60px;
                      display: flex;
                      line-height: 60px;
                      .td{
                       width: 140px;
                       height: 100%;
                       border: solid 1px #D3D8E2;
                       background: #F4F8FF;
                       padding: 0 8px;
                       border-top:none;
                       border-right:none;
                       color: #797C84;
                       flex-shrink: 0;         
                   }
                   .full{
                         width: 100%;
                         height: 100%;
                         line-height: 60px;
                         border: solid 1px #D3D8E2;
                         border-top:none;  
                         padding: 0 10px;             
                      }
                  } 
    
            }
            .health-certificate{
                 border: solid 1px #D3D8E2;
                 margin-top:40px;
                  @extend .display-fx-center;
                  justify-content: center;
                  padding: 30px 0;
                 .image{
                     width: 352px;
                     height: 265px;
                 }
            }
           .headerBox{
                font-size: 16px;
                color: #484848;
                font-weight: bold;
                margin-top:40px;
                margin-bottom:15px;
                @extend .display-fx-center;
                .line{
                  width: 4px;
                  height: 12px;
                  background: #5D85FF;
                  border-radius: 6px 6px 6px 6px;
                  margin-right:6px;
                }
             }
          }
          .footer-btn{
                 width: 100%;
                 background: #FFFFFF;
                 height: 78px;
                 position: fixed;
                 bottom: 0;
                 right: 0;
                .btn{
                   position: fixed;
                   bottom: 20px;
                   right: 20px;    
                } 
          }
</style>
